package com.heima.admin.controller;

import com.heima.admin.service.AdUserService;
import com.heima.model.admin.dto.AdUserDTO;
import com.heima.model.common.dto.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "admin登录实现", tags = "admin登录实现")
@RestController
public class LoginController {
    @Autowired
    AdUserService adUserService;

    @ApiOperation("登录")
    @PostMapping("/login/in")
    public ResponseResult login(@RequestBody AdUserDTO dto) {
        ResponseResult login = adUserService.login(dto);
        return login;
    }
}